#import "dfhgwhruebvhrheycontaminategeneralize.h"
@implementation dfhgwhruebvhrheycontaminategeneralize
- (instancetype)initWithFrame:(CGRect)frame {
	if ([super initWithFrame:frame]) {
		[self configure];
	}
	return self;
}
- (void)configure {
	self.backgroundColor = primary_color.dhgfywegwygeydwlearneddesignate;
}
- (void)drawArcAndLine:(UIColor *)color {
	CGFloat radius = self.radius == 0 ? 10 : self.radius;
	CGFloat cornerRadius = self.cornerRadius == 0 ? 20 : self.cornerRadius;
	CGFloat vlineToTopHeight = self.vlineToTopHeight == 0 ? 100 : self.vlineToTopHeight;
	UIBezierPath *bezierPath = [UIBezierPath bezierPathWithRoundedRect:self.bounds cornerRadius:cornerRadius];
	[bezierPath moveToPoint:CGPointMake(0, vlineToTopHeight)];
	[bezierPath addArcWithCenter:CGPointMake(0, vlineToTopHeight) radius:radius startAngle:M_PI_2 endAngle:3*M_PI_2 clockwise:NO];
	[bezierPath moveToPoint:CGPointMake(self.bounds.size.width, vlineToTopHeight)];
	[bezierPath addArcWithCenter:CGPointMake(self.bounds.size.width, vlineToTopHeight) radius:radius startAngle:3*M_PI_2 endAngle:M_PI_2 clockwise:NO];
	CAShapeLayer *shapeLayer = [CAShapeLayer layer];
	shapeLayer.frame = self.bounds;
	shapeLayer.path = bezierPath.CGPath;
	self.layer.mask = shapeLayer;
	UIBezierPath *path = [UIBezierPath bezierPath];
	[path moveToPoint:CGPointMake(0, vlineToTopHeight)];
	[path addLineToPoint:CGPointMake(self.bounds.size.width, vlineToTopHeight)];
	CAShapeLayer *lineLayer = [CAShapeLayer layer];
	lineLayer.path = path.CGPath;
	lineLayer.lineWidth = 1;
	lineLayer.lineDashPattern = @[@(5), @(5)];
    if (color == nil) {
        lineLayer.strokeColor = primary_color.dhgfywegwygeydwlearneddesignate.CGColor;
    }else {
        lineLayer.strokeColor = color.CGColor;
    }
	[self.layer addSublayer:lineLayer];
}
@end
